home *** CD-ROM | disk | FTP | other *** search
/ Skunkware 98 / Skunkware 98.iso / src / mail / pine3.96.tar.gz / pine3.96.tar / pine3.96 / pine / osdep / coredump.fpe < prev    next >
Text File  |  1995-02-10  |  627b  |  20 lines

  1. /*----------------------------------------------------------------------
  2.      Abort with a core dump
  3.  
  4. Some systems can't abort() from a signal handler if the signal handler
  5. installed catches the signal abort() uses to actually do the abort. That
  6. is, even resetting the signal default doesn't occur until the program
  7. leaves the handler routine. This winds up causing infinite loops. To
  8. avoid this we just never catch SIGFPE which is assumed to be very rare
  9. in Pine and just kill ourselves with it when we want to abort with a
  10. core dump.
  11.  ----*/
  12. void
  13. coredump()
  14. {
  15.     kill(getpid(), SIGFPE);
  16.     exit(-1);    /* Just in case */
  17. }
  18.  
  19.  
  20.